/**
 * 场景物件
 *author:noodles 
 */
package com.gamebase.role
{
	import flash.display.DisplayObject;
	import flash.display.Sprite;

	public class ScenceObject extends Sprite
	{
		public function ScenceObject(obj:DisplayObject=null)
		{
			super();
			this.buttonMode = true;
			this.mouseEnabled = true;
			this.useHandCursor = true;
			this.useHandCursor = true;
			if(obj != null)	this.addChild(obj);
		}
		
		public function setObject(object:DisplayObject):void
		{
			var origX:Number = object.x;
			var origY:Number = object.y;
			object.x = object.width/2;
			object.y = object.height;
			this.addChild(object);
			this.x = origX;
			this.y = origY;
		}
		
	}
}